Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactor and simplification of cast.py #458

Merged
merged 8 commits into from
Mar 8, 2024
Merged

Conversation

xsdg
Copy link
Collaborator

@xsdg xsdg commented Mar 8, 2024

  • Resolves ambiguity of available_devices as being a method or a list
  • Creates an AvailableDevice dataclass to simplify data access
  • Moves print_available_devices helper to cast.py
  • Creates a currently-non-functional backup and drops Sonos support from main Casting class
  • Drops long-deprecated reboot support

Also, this avoids using available_devices as a global variable, which makes progress on #425

…ecast in years.

There's the possibility of reintroducing this for Sonos, if that's still supported, but the Sonos support is tacked on right now in a way that really hurts the code design, so it'll make more sense to add that back, if needed, than to preserve the functionality in its current form.
…was patched together in a way that really hurts code readability, modularity, correctness, etc.

This intentionally leaves the Sonos code disabled, so that we can hopefully refactor the Chromecast code into a better design.  Then we can re-incorporate Sonos support into that design in a better way.
…method/attribute ambiguity, and moves print_available_devices to the cast module.
@xsdg xsdg merged commit 5a17e40 into muammar:master Mar 8, 2024
@xsdg xsdg deleted the cast_cleanup branch March 8, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant